import { instance } from '../utils/request';

const getOrdersPagination = async (
  page: number,
  limit: number,
  key?: string,
  statuss?: number[]
) => {
  return instance.get('/Orders/SupplierPagination', { page, limit, key, statuss });
};

const takeOrder = async (id: number) => {
  return await instance.post('/Orders/TakeOrder', { id });
};

const shipment = async (id: number) => {
  return await instance.post('/Orders/Shipment', { id });
};

const OrdersApi = {
  getOrdersPagination,
  takeOrder,
  shipment,
};

export default OrdersApi;
